
#include "main_window.h"

MainWindow::MainWindow(QWidget* parent)
	:QMainWindow(parent)
{
	setupUi(this);
	conn = new Telnet("192.168.56.101", 5038, this);
}

void MainWindow::sendData() {
	QString query = queryField->toPlainText();
	qDebug() << conn->writeData(query.toAscii().data());
}

void MainWindow::showResponse() {
	QVector<QString> msgs = conn->getResponse();
	for (int i = 0; i < msgs.count(); i++) {
			responseField->appendPlainText(msgs[i]);
	}
}
